package com.hospital.demo.enums;

/**
 * Description:错误类型enum，主要用来返回错误码
 * Date: 2019/1/28
 */
public enum ExceptionCodeEnums {

    DATA_NOT_FOUND(1, "数据不存在 "),
    DATA_IS_EXIST(2, "数据已存在 "),
    INSERT_FAIL(3,"添加失败,请检查数据是否合法"),
    DELETE_FAIL(4,"删除失败"),
    UPDATE_FAIL(5,"更新失败,请检查数据是否合法"),
    ;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    ExceptionCodeEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
